Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable directml #356

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

enable directml #356

wants to merge 22 commits into from

Conversation

HPPinata
Copy link
Contributor

This should broaden our compatibility, although with significantly worse performance than native libraries.

ToDo:
Worse Performance shold be documented and advised against, before announcing this.

The PR still needs the knobs and dials to only enable directml under certain conditions, easiest would be an eqivalent to --amd and then maybe another initialization script?

Or maybe think about a way to properly detect what plattform we are running on and go from there?
Having 4 different update-runtime scripts mostly doing the same is getting a bit out of hand...

@HPPinata HPPinata force-pushed the directml branch 4 times, most recently from 4963ba4 to a8fe38f Compare November 26, 2024 20:46
@HPPinata HPPinata marked this pull request as ready for review November 30, 2024 10:12
@HPPinata
Copy link
Contributor Author

@tazlin here I'd like a thorough review.
I don't really know what I'm doing in Python, so this is basically just copy/paste and google-fu.

I got it to a state where it works locally, but only if I set safety_on_gpu: false and as I already mentioned Flux.1 also doesn't work because of the datatypes it's using.

The update.cmd and bridge.cmd scripts are copy/pastes of the cuda version with minimally different requirements/arguments (this could potentially be solved more elegantly...)

I'll write some user documentation when I know the core logic is actually working as best it can.
Speed and VRAM usage is still atrocious, but that can be tackled later (if there even is a fix for that at all...).

As for the commit history: I can clean that up before the merge, everything up to pass directml is essentially testing whether it works at all, everything after is me trying to do things "properly"

Torch versions, especially experimental plugins, are notorious for introducing breaking changes version to version. Pinning will help minimize this chance.
With the introduction of directml and the current landscape, its likely we may yet increase the number of supported driving technologies, so I've refactored the relevant tests to be more modular
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants